package com.study.designmodes.controller.pattern.liabilityChain.v4;

import com.study.designmodes.service.liabilityChain.v4.BuildWashFaceSlotChainBuilder;
import com.study.designmodes.service.liabilityChain.v4.bean.Student;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author yangyanbin
 * @since 20230323
 **/
@RestController
@RequestMapping("/v3/liabilityChain")
public class LiabilityChainController {

    @Resource
    private BuildWashFaceSlotChainBuilder buildWashFaceSlotChainBuilder;

    @PostMapping("/slotChain")
    public void processSlotChain() {
        Student student = new Student();
        student.setName("小明");
        buildWashFaceSlotChainBuilder.build().process(student);
    }
}
